"""
讲师:caoyan
日期：2022/8/26 16:27
"""
import requests

from app import BASE_URL


class  LoginAPI:

    def  __init__(self):
           self.url_verify=BASE_URL+"/ssm2/code.action"
           self.url_login=BASE_URL+"/ssm2/muserLogin.action"

    def   verify_code(self,session):

          return   session.get(url=self.url_verify)



    def   login(self,session,username,password,checkImg):
          data={
          "username":username,
          "password":password,
          "checkImg":checkImg
          }
          return   session.post(url=self.url_login,json=data)
